package me.ree.zkproduct.handler;

import lombok.extern.slf4j.Slf4j;
import me.ree.zkproduct.event.MyEventPublisher;
import org.springframework.stereotype.Component;

import javax.annotation.PostConstruct;

@Slf4j
@Component
public class EventHandler {

    @PostConstruct
    public void publishMyEvent() {
        log.info("EventHandler publishMyEvent begin...");
        MyEventPublisher myEventPublisher = ApplicationContextHandler.getBean(MyEventPublisher.class);
        myEventPublisher.publishMyEvent("test my event");
    }
}
